package com.chenfan.filestore.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.Date;

@Data
public class TaskVO {
    //任务id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long taskId;
    private String taskName;
    //系统id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long systemId;
    private String systemName;
    //模块id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long moduleId;
    private String moduleName;
    //任务类型 1 导出 2导入
    private Integer taskType;
    //模板id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long templateId;
    //最终执行sql
    private String sql;
    //下载文件名
    private String fileName;
    //下载文件url
    private String downFileUrl;
    //总记录数

    private Long totalCount;
    //已处理记录数
    private Long alreadyCount;
    //执行开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date doTime;
    //执行结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date doneTime;
    //执行结果信息
    private String resultMsg;
    //执行异常堆栈
    private String stackTrace;
    //任务执行状态 0待执行 10执行中  20成功 30失败
    private Integer status;
    //是否删除 0未删除 1删除
    private Integer isDelete;
    //租户id
    private Long tenantId;
    //公司id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long companyId;
    //创建人id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createBy;
    //创建人名称
    private String createName;
    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;
    //更新人
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updateBy;
    //更新人名称
    private String updateName;
    //更新时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;

    private Double differenceTime;
}
